These programs will re-produce results reported in "Estimating Measurement Error in Annual Job Earnings:  A Comparison of Survey and Administrative Data" by John M. Abowd
and Martha H. Stinson published in Review of Economics and Statistics Dec 2013.

The data used for this paper are confidential and are not posted.  The paper authors were allowed access to these data as part of the regular work duties of Martha Stinson, a Census Bureau employee, 
and the contractual arrangement between John Abowd and the Census Bureau (IPA).

Researchers wishing to gain access to these data should submit a project proposal through the
Census Bureau Research Data Center (RDC) Network.  Instructions for how to submit such a proposal can be found at http://www.census.gov/ces/rdcresearch/ and questions can be sent to the 
RDC administrator at the location most convenient to the interested researcher (see http://www.census.gov/ces/rdcresearch/howtoapply.html).  Please note that any request to use
these data will require IRS and SSA approval in addition to Census approval.

This paper uses internal, confidential SIPP data from the 1990, 1991, 1992, 1993, and 1996 panels matched to a Detailed Earnings Record Extract from SSA's Master Earnings File.  

Master input data are listed in def-cross.sas.  This program is then called in every subsequent program that begins with the master input data.
The version of def-cross.sas which is posted here lists the filenames but does not list server location.  

M. Stinson agrees to maintain a confidential version of def-cross.sas which also lists the locations of these data sets on internal Census servers and
agrees to provide this confidential version to the RDC administrator who approves any external request to use these data, as long as she is an employee of the Census Bureau.  

All intermediate data sets created from the master input files are stored in a working directory defined using the SAS libname "mar".  
Users should define the "mar" libname either in the individual programs or as a separate program that is then called by the individual programs.

The software used by these programs was SAS version 9.2 and ASREML version 3.0 and the operating system run by the Census Bureau internal server was Linux version 2.6.18-371.8.1.el5.

Order of programs:
Step 1:  Make person-level characteristics file for each SIPP panel 1990, 1991, 1992, 1993, 1996
Input data:  
family and person wave-level files and employment history topical module by SIPP panel as listed in def-cross.sas and called by macro names in the programs.

Output data:
linkwaves051990.sas7bdat
linkwaves051991.sas7bdat
linkwaves051992.sas7bdat
linkwaves051993.sas7bdat

sipp1990panelsub.sas7bdat
sipp1991panelsub.sas7bdat
sipp1992panelsub.sas7bdat
sipp1993panelsub.sas7bdat

emphis021990_lfexp.sas7bdat
emphis021991_lfexp.sas7bdat
emphis021992_lfexp.sas7bdat
emphis021993_lfexp.sas7bdat

emphis021990_startdate.sas7bdat
emphis021991_startdate.sas7bdat
emphis021992_startdate.sas7bdat
emphis021993_startdate.sas7bdat

linkwaves051996.sas7bdat
emphis011996.sas7bdat

Programs:
sipp-linkwaves02.sas
sipp-linkwaves03.sas
sipp-linkwaves04.sas
sipp-linkwaves05.sas
sipp-prep01.sas
sipp-emphismod01allyears.sas
sipp-emphismod02allyears.sas

sipp-linkwaves02.1996.sas
sipp-linkwaves03.1996.sas
sipp-linkwaves04.educ.1996.sas
sipp-linkwaves04.hi.1996.sas
sipp-linkwaves04.hiunit.1996.sas
sipp-linkwaves04.lf.1996.sas
sipp-linkwaves04.month.1996.sas
sipp-linkwaves04.wave.1996.sas
sipp-linkwaves05.1996.sas
sipp-emphismod011996.sas

Step 2:  Make DER job-level file
Input data:
sippder_all_master.sas7bdat
iu_pu_pikxw1990_final.sas7bdat
iu_pu_pikxw1991_final.sas7bdat
iu_pu_pikxw1992_final.sas7bdat
iu_pu_pikxw1993_final.sas7bdat
iu_pu_pikxw1996_final.sas7bdat
ssel87su.sas7bdat - ssel98su.sas7bdat
ssel1999su.sas7bdat
ssel87mu.sas7bdat 
(The ssel88mu.sas7bdat data set does not exist and so was not used in these programs)
ssel89mu.sas7bdat - ssel98mu.sas7bdat
ssel1999mu.sas7bdat

Output data:
derjobs03a1990.sas7bdat
derjobs041990.sas7bdat
derjobs03a1991.sas7bdat
derjobs041991.sas7bdat
derjobs03a1992.sas7bdat
derjobs041992.sas7bdat
derjobs03a1993.sas7bdat
derjobs041993.sas7bdat
derjobs03a1996.sas7bdat
derjobs041996.sas7bdat

Programs:
derjobs01.sas
01.01.sipp.estabs.sas
02.02.sipp.estabs.sas
03.03.sipp.estabs.sas
04.04.sipp.estabs.sas
05.05.sipp.estabs.sas
derjobs02.sas
derjobs03.sas
derjobs04.sas

Step 3:  Make SIPP job-level file
Input data:
job wave-level files by SIPP panel as listed in def-cross.sas and called by macro names in the programs.
derjobs03a1990.sas7bdat
derjobs03a1991.sas7bdat
derjobs03a1992.sas7bdat
derjobs03a1993.sas7bdat
derjobs03a1996.sas7bdat

Output data:
makejobs19e1990.sas7bdat
makejobs19e1991.sas7bdat
makejobs19e1992.sas7bdat
makejobs19e1993.sas7bdat

makejobs221990.sas7bdat
makejobs221991.sas7bdat
makejobs221992.sas7bdat
makejobs221993.sas7bdat

makejobs071996.sas7bdat
makejobs111996.sas7bdat

Programs:
makejobs01.sas
makejobs02.sas
makejobs03.sas
makejobs04.sas
makejobs05.sas
makejobs06.sas
makejobs07.sas
makejobs08.sas
makejobs09.sas
makejobs10.sas
makejobs11.sas
makejobs12.sas
makejobs13.sas
makejobs14.sas
makejobs15.sas
makejobs16.sas
makejobs17a.sas
makejobs17b.sas
makejobs18.sas
makejobs19.sas
makejobs19b.sas
makejobs19c.sas
makejobs19d.sas
makejobs19e.sas
makejobs20.sas
makejobs21.sas
makejobs22.sas

makejobs01.1996.sas
makejobs02.1996.sas
makejobs03.1996.sas
makejobs04.1996.sas
makejobs05.1996.sas
makejobs06.1996.sas
makejobs07.1996.sas
makejobs08.1996.sas
makejobs09.1996.sas
makejobs10.1996.sas
makejobs11.1996.sas

Step 4:  Link SIPP and DER job-level files
Input data:
makejobs221990.sas7bdat
makejobs221991.sas7bdat
makejobs221992.sas7bdat
makejobs221993.sas7bdat
makejobs111996.sas7bdat

derjobs041990.sas7bdat
derjobs041991.sas7bdat
derjobs041992.sas7bdat
derjobs041993.sas7bdat
derjobs041996.sas7bdat

xwlk_b1989.sas7bdat - xwlk_b1999.sas7bdat

ser_capped_master.sas7bdat
sippder_all_master.sas7bdat

Output data:
linkjobs08a.sas7bdat
linkjobs08b1990.sas7bdat
linkjobs08b1991.sas7bdat
linkjobs08b1992.sas7bdat
linkjobs08b1993.sas7bdat
linkjobs08b1996.sas7bdat

Programs:
linkjobs01.sas
linkjobs02.sas
linkjobs03.sas
linkjobs04.sas
linkjobs05.sas
linkjobs06a.sas
linkjobs06b.sas
linkjobs07.sas
linkjobs08.sas


Step 5:  Add EIN and other DER data to SIPP job files
Input data:
makejobs19e1990.sas7bdat
makejobs19e1991.sas7bdat
makejobs19e1992.sas7bdat
makejobs19e1993.sas7bdat

linkjobs08b1990.sas7bdat
linkjobs08b1991.sas7bdat
linkjobs08b1992.sas7bdat
linkjobs08b1993.sas7bdat

emphis021990_lfexp.sas7bdat
emphis021991_lfexp.sas7bdat
emphis021992_lfexp.sas7bdat
emphis021993_lfexp.sas7bdat

emphis021990_startdate.sas7bdat
emphis021991_startdate.sas7bdat
emphis021992_startdate.sas7bdat
emphis021993_startdate.sas7bdat

wrkrsn1990.sas7bdat
wrkrsn1991.sas7bdat
wrkrsn1992.sas7bdat
wrkrsn1993.sas7bdat

makejobs07.sas7bdat
linkjobs08b1996.sas7bdat
emphis011996.sas7bdat

derjobs03a1990.sas7bdat
derjobs03a1991.sas7bdat
derjobs03a1992.sas7bdat
derjobs03a1993.sas7bdat
derjobs03a1996.sas7bdat

Output data:
makejobs301990.sas7bdat
makejobs301991.sas7bdat
makejobs301992.sas7bdat
makejobs301993.sas7bdat

makejobs171996.sas7bdat

Programs:
makejobs_addein23.sas
makejobs_addein24.sas
makejobs_addein25.sas
makejobs_addein26a_linkemphis.sas
makejobs_addein26b_linkemphis.sas
makejobs_addein27.sas
makejobs_addein28.sas
makejobs_addein29.sas
makejobs_addein30.sas

makejobs_addein12.1996.sas
makejobs_addein13.1996.sas
makejobs_addein14.1996.sas
makejobs_addein15.1996.sas
makejobs_addein16.1996.sas
makejobs_addein17.1996.sas
makejobs_addein18.1996.sas


Step 6:  Prepare Data for Analysis
Input data:
linkwaves051990.sas7bdat
linkwaves051991.sas7bdat
linkwaves051992.sas7bdat
linkwaves051993.sas7bdat

sipp1990panelsub.sas7bdat
sipp1991panelsub.sas7bdat
sipp1992panelsub.sas7bdat
sipp1993panelsub.sas7bdat

makejobs301990.sas7bdat
makejobs301991.sas7bdat
makejobs301992.sas7bdat
makejobs301993.sas7bdat


linkwaves051996.sas7bdat
makejobs171996.sas7bdat

linkjobs08a.sas7bdat
iu_pu_pikxw1990_final.sas7bdat
iu_pu_pikxw1991_final.sas7bdat
iu_pu_pikxw1992_final.sas7bdat
iu_pu_pikxw1993_final.sas7bdat
iu_pu_pikxw1996_final.sas7bdat


Output data - ASCII files to read into ASREML:
job-level files:
linksipppanelsrwsect1.dat
linksipppanelsrwsectimputeonly.dat
linksipppanelsrwsectnoimpute.dat

person-level files:
sipppersonrwsect.dat
sipppersonrwsectimputeonly.dat
sipppersonrwsectnoimpute.dat

Programs:
01.linkpersonjob.sas
01.intvw.linkpersonjob.sas
02.linkpersonjob.sas
03.calcsipplfexp.sas
04.derlfexp.sas

01.linkpersonjob.1996.sas
02.linkpersonjob.1996.sas
03.calcsipplfexp.1996a.sas
03.calcsipplfexp.1996b.sas
04.derlfexp.1996.sas

05.createaf.asreml1.new.sas
05.createaf.asreml2.new.sas
05.createaf.asreml3.new.sas
05.createaf.asreml4.newdata.sas

05.createaf.asreml1.noimpute.sas
05.createaf.asreml2.noimpute.sas
05.createaf.asreml3.noimpute.sas
05.createaf.asreml4.noimpute.sas

05.createaf.asreml1.imputeonly.sas
05.createaf.asreml2.imputeonly.sas
05.createaf.asreml3.imputeonly.sas
05.createaf.asreml4.imputeonly.sas

08.createaf.person.addein.sas
08.createaf.person.asreml1.sas
08.createaf.person.asreml2.sas
08.createaf.person.asreml3.sas
08.createaf.person.asreml4.sas

08.createaf.person.addein.imputeonly.sas
08.createaf.person.asreml1.imputeonly.sas
08.createaf.person.asreml2.imputeonly.sas
08.createaf.person.asreml3.imputeonly.sas
08.createaf.person.asreml4.imputeonly.sas

08.createaf.person.asreml1.noimpute.sas
08.createaf.person.asreml2.noimpute.sas
08.createaf.person.asreml3.noimpute.sas
08.createaf.person.asreml4.noimpute.sas

18.covartable.new.sas - produces output for Tables 2-4
personjobyear_samplesizes.sas - produces output for Table 1
samplesizes.sas - produces output for Table 1

Step 7:  Analysis in ASREML
Input data:
job-level files:
linksipppanelsrwsect1.dat
linksipppanelsrwsectimputeonly.dat
linksipppanelsrwsectnoimpute.dat

person-level files:
sipppersonrwsect.dat
sipppersonrwsectimputeonly.dat
sipppersonrwsectnoimpute.dat

Output data:
CSV files that are Excel input files for making tables (see last two SAS programs in program list below for exact file names)

Programs:
merror_basespec2_ar.as
merror_basespec2_imputeonly_ar.as
merror_basespec2_noimpute_ar.as

merror_person_basespec2_ar.as
merror_person_basespec2_firmeff.as
merror_person_basespec2_imputeonly_ar.as
merror_person_basespec2_noimpute_ar.as
merror_person_basespec2_firmeff_noimpute.as

merror_basespec2_all_readinfe.sas
merror_basespec2_all_readinre.sas
02.01.fixedeffects.sas - produces output for tables 7,8 and appendix tables 7.1-7.6, 8.1-8.6 and figures D1-D4.
02.02.randomeffects.sas - produces output for tables 5,6
